<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-hatchetAnnouncement-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">标题：</label>
				<div class="col-sm-8">
					<input id="title" name="title" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">内容：</label>
				<div class="col-sm-8">
					<textarea rows="10" cols="5" id="content" name="content" class="form-control" >
					
					</textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">接收用户：</label>
				<div class="col-sm-8">
					<select class="form-control m-b" name="updateUser" th:with="type=${@dict.getType('merchant_level')}">
						<option value="0">全部商户</option>
						<option value="4">重要公告</option>
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">生效时间：</label>
				<div class="col-sm-8">
					<input type="text" class="time-input" id="strEffectiveFromTime" name="strEffectiveFromTime"/>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">失效时间：</label>
				<div class="col-sm-8">
					<input type="text" class="time-input" id="strEffectiveToTime" name="strEffectiveToTime"/>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/hatchetAnnouncement"
		$("#form-hatchetAnnouncement-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-hatchetAnnouncement-add').serialize());
	        }
	    }
	</script>
</body>
</html>
